package org.example.demo3.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.demo3.info.*;

import java.util.List;

@Mapper
public interface Articlemapper {
    List<Articleinfo> getarticle(Userinfo userinfo);
    Integer delete(Integer id);
    Articleinfo_plus getarticlecontent(Integer id);
    Integer rcount (Integer row);
    Integer edit_article(Articleinfo articleinfo);
    Integer add_article(Articleinfo articleinfo);
    Integer allpage();
    List<Articleinfo_plus> this_page_content(@Param("index") int index, @Param("page") int page);
    Userinfo author (int uid);
    Integer setresponse(Responseinfo responseinfo);
    List<Responseinfo> getresponse(Integer reviewid);
    Integer setreview(Reviewinfo reviewinfo);
    List<Reviewinfo> getreview(Integer blogid);
    Integer deletereview(Integer id);
    Integer deletereview_response(Integer id);
    Integer deleteresponse(Integer id);
    Delete_Review_Response verify_review(int id);
    Delete_Review_Response verify_response(int id);
    List<Responseinfo> get_response_res(Responseinfo responseinfo);
    int setresponse_res(Responseinfo responseinfo);
    List<Responseinfo> response_tree_cons(@Param("responseid") int responseid);
    Responseinfo by_id_find_response(@Param("id") int id);
    int add_type(@Param("type") String type,@Param("userid") int userid);
    List<String> type_content (int userid);
    List<Articleinfo> getarticle_by_type(@Param("id") int id,@Param("type") String type);
    int delete_type_count(String type);
    int delete_type();
    String select_type_byid(@Param("id") int id);
    Userinfo activ_count(@Param("id1") int id1,@Param("id2") int id2,@Param("id3") int id3);
    Articleinfo_plus hot_count(@Param("blogid1") int blogid1,@Param("blogid2") int blogid2,@Param("blogid3") int blogid3);
    List<Articleinfo_plus> get_all_article();
}
